<template>
  <div>
    <h1>选择喜欢的：</h1>
    <!-- <input type="checkbox"  value="科幻" v-model="list">科幻
    <input type="checkbox"  value="喜剧" v-model="list">喜剧
    <input type="checkbox"  value="动漫" v-model="list">动漫
    <input type="checkbox"  value="冒险" v-model="list">冒险
    <input type="checkbox"  value="科技" v-model="list">科技
    <input type="checkbox"  value="军事" v-model="list">军事
    <input type="checkbox"  value="娱乐" v-model="list">娱乐
    <input type="checkbox"  value="奇闻" v-model="list">奇闻 
    <ul>
      <li v-for="(item,index) in list" :key="index">
      {{item}}
    </li>
    </ul> -->
    <div v-for="(item,index) in list" :key="index" style="display:inline-block">
      <input type="checkbox" :value="item" v-model="list1">
      {{item}}
    </div>
    <ul>
      <li v-for="(item,index) in list1" :key="index">
      {{item}}
    </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      // list:[]
      list: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      list1:[]
    }
  },
}
</script>

<style></style>
